home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / DBL Pascal Library / INIT Shell Folder / INIT Shell ƒ / Shell ƒ / INITDoInstall.p next >
Text File  |  1990-06-23  |  2KB  |  46 lines

  1. unit INITDoInstall;
  2. {Copyright © 1990, David B. Lamkins}
  3. {All rights reserved.}
  4.  
  5. interface
  6.  
  7.     uses
  8.         INITShellGlobals;
  9.  
  10.     type
  11.         callbackCode = (initCallback,    {param1=maxPatches,param2=maxVBLs,param3=globalsSize}
  12.             setPatch,                        {param1=resID, param2=trapWord}
  13.             setVBL,                            {param1=resID, param2=count, param3=phase}
  14.             failInstall,                        {no params}
  15.             doNotInstall,                    {no params}
  16.             suppressIcon                    {no params}
  17.             );
  18.  
  19.     procedure DoInstall (procedure InstallCallback (func: callbackCode; param1, param2, param3: INTEGER));
  20.  
  21. implementation
  22.  
  23. {The following code is called only once, at INIT time.  If there are any trap patches or VBL}
  24. {tasks, load and install them using InstallCallback with the setPatch or setVBL function code.}
  25. {Patch and VBL installation errors are handled by the callback routine.  If you want to execute}
  26. {one-time code, do it here and signal any errors using the provided failInstall callback code.}
  27. {}
  28. {Permanently resident code for patches and VBLs is compiled in separate projects as a resource}
  29. {of type defined by the ResidentType constant.}
  30. {}
  31. {Global data to be used by patches and VBLs is declared in the INITShellGlobals unit.}
  32. {}
  33. {The INITShellLoader unit initializes QuickDraw and opens a port for you to use.  The port remains}
  34. {open through DoInstall, and is actually used by the loader when it draws the INIT icon.  You can}
  35. {use it if you want to put up dialogs, splash screens, or whatever - but read TN 247 first…}
  36.  
  37.     procedure DoInstall (procedure InstallCallback (func: callbackCode; param1, param2, param3: INTEGER));
  38.         const
  39.             numberOfPatches = 0;
  40.             numberOfVBLs = 0;
  41.     begin
  42.         InstallCallback(initCallback, numberOfPatches, numberOfVBLs, SIZEOF(INITGlobals));
  43.     {• Your code goes here. •}
  44.     end;
  45.  
  46. end.